import pandas as pd

df = pd.DataFrame({"b":[-0.204708,-0.55573,0.092908,1.246435],"d":[0.478943,1.965781,0.281746,1.007189],"e":[-0.519439,1.393406,0.769023,-1.296221]},index=["Utah","Ohio","Texas","Oregon"])

print(df)

f = lambda x: x.max() - x.min()

f1 = df.apply(f)

print(f1)

f3 = df.apply(f,axis='index')
print(f3)

f2 = df.apply(f,axis='columns')

print(f2)